import java.util.HashMap;

public class Demo2HashMap {

    public static void main(String[] args) {
        HashMap <Student,String> students=new HashMap<Student,String>();


        Student s1=new Student("蒋恬",202);
        Student s2=new Student("陈海圣",203);
        Student s3=new Student("小蒋恬",204);

        students.put(s1,"常熟");
        students.put(s2,"北京");
        students.put(s3,"上海");
        System.out.println(students);

        for (Object object :
                students.keySet()) {
            System.out.println(object+"======"+students.get(object));
        }

    }
}
